<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>13vue-v-for的使用</title>
    <script type="text/javascript" src="static/vue.min.js"></script>
</head>

<body>
<div class="tab_con">
    <!--1.遍历普通列表-->
    <div v-for="num,index in list">
        {{num}}---{{index}}
    </div>
    <!--2.遍历对象列表-->
    <p v-for="list,index in JsonList">
        {{list}}---{{index}}---{{list.id}}---{{list.name}}---{{list.gender}}---{{list.age}}
    </p>
    <!--3.遍历对象-->
    <p v-for="obj in Json">
        {{obj}}---{{obj.id}}---{{obj.name}}---{{obj.gender}}---{{obj.age}}
    </p>
    <!--4.遍历数子-->
    <p v-for="count in 10">
        {{count}}
    </p>


</div>
<script>
    new Vue({
        el: ".tab_con",
        data: {
            list:[1,3,4,5,39],
            JsonList:[
                {id:1001,name:"张三",gender:"男",age:22},
                {id:1002,name:"马冬梅",gender:"男",age:22},
                {id:1003,name:"李白",gender:"男",age:22},
                {id:1004,name:"霍元甲",gender:"男",age:22}
            ],
            Json:{id:1004,name:"袁华",gender:"男",age:22}
        },
        methods: {

        }
    })
</script>
</body>
</html>